﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutcomeFour.aspx.cs" Inherits="Thksoft.Module.ProjectDetails.OutcomeFour" %>

<!DOCTYPE html>
<html class="L_UI">
<head id="Head1" runat="server">
    <title>材料费用明细表</title>
    <link href="../../CSS/Main.css" rel="stylesheet" type="text/css" />
    <link href="../../UserCotrols/My97DatePicker/skin/WdatePicker.css" rel="stylesheet"
        type="text/css" />
    <script src="../../UserCotrols/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Scripts/correctpng.js" type="text/javascript"></script>
    <script src="../../Scripts/Total.js" type="text/javascript"></script>
    <script src="../../Scripts/LastSum.js" type="text/javascript"></script>
    <script src="../../Scripts/NowPlan.js" type="text/javascript"></script>
    <script src="../../Scripts/AddRow.js" type="text/javascript"></script>
    <style type="text/css">
        .txt {
            border: none;
            height: 18px;
            line-height: 18px;
            width: 150px;
        }

        .data {
            border-left: 1px solid #6aa4d2;
            margin: 2px 5px;
            width: 100%;
        }

        .btxt {
            border: 0px;
            width: 100%;
            text-align: center;
        }

        .xmmc {
            text-align: left;
            padding-left: 5px;
        }

        .sum {
            font-weight: bold;
        }

        td.text-left {
            text-align: left;
            padding-left: 5px;
        }
    </style>
</head>
<body class="bgcss">
    <script type="text/javascript">
        var app1 = {};
        //刷新前页面（前页面不许是通过layer插件交互的）
        app1.ReLoad = function () {
            console.log("GoGo");
            top.$("#layui-layer" + top.layer.getFrameIndex(window.name))[0].ReLoad();
            var index = top.layer.getFrameIndex(window.name);
            top.layer.close(index);
        }
        app1.YanZheng_Jin_E = function (obj) {
            //var reg = /^[-]?\d+[.]?\d*$/;
            var reg = /^(([^0][0-9]+|0)\.([0-9]{1,6})$)|^(([^0][0-9]+|0)$)|^(([1-9]+)\.([0-9]{1,6})$)|^(([1-9]+)$)/;
            var va = $(obj).val();
            if (!reg.test(va)) {
                alert("【温馨提示】输入格式不对，小数点后最多只能输入6位！");
                $(obj).focus();
            }
        }

        function FORM_CLOSE() {
            var index = top.layer.getFrameIndex(window.name); //获取窗口索引
            top.$("#layui-layer" + index + " .layui-layer-close").click();
        }

        function CheckCustomer(tbx, hf) {
            var option = {};
            option.Window = window;
            option.CallBack = function (index, dom) {
                try {
                    var data = top.window.frames["layui-layer-iframe" + index].ModalData;
                    if (!(data.Text == "" && tbx.value != "单击选择客户公司")) {
                        if (data.Text == "") {
                            data.Text = "单击选择客户公司";
                        }
                        tbx.value = data.Text;
                        hf.value = data.Value;
                    }
                }
                catch (e) {

                }
            }
            option.Value = "?MODE=SINGELE";
            top.MessageBox.OpenCustomer(option);
        }
    </script>
    <%--<body>--%>
    <form id="form1" runat="server">
        <div class="Window" style="width: 100%;">
            <div class="Content" style="top: 0px; width: 100%;">
                <div class="Header" style="bottom: 35px; height: inherit; overflow: inherit; overflow-y: auto; width: 100%;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <div style="float: right; text-align: right; color: Red; font-size: 14px; margin-right: 10px;">
                                    金额单位：万元
                                </div>
                                <asp:GridView ID="gvMonthPlan" Width="100%" CssClass="cont_list" AutoGenerateColumns="False"
                                    ShowHeaderWhenEmpty="true" runat="server" OnRowDataBound="gvMonthPlan_RowDataBound1">
                                    <Columns>
                                        <asp:TemplateField HeaderStyle-Width="2%">
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="chkSelectAll" runat="server" Onclick="GetAllCheckBox(this)" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chkSelectId" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="序号" HeaderStyle-Width="5%">
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox1" Width="99%" CssClass="txt" Style="text-align: center;"
                                                    runat="server"></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="2%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="单位名称">
                                            <ItemStyle CssClass="text-left" />
                                            <ItemTemplate>
                                                <asp:TextBox ID="FORM_COM_STRING" CssClass="txt" Width="99%" runat="server" Text="请选择公司"></asp:TextBox>
                                                <asp:HiddenField ID="FORM_COM_IDS" runat="server" />
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="款项类别" ItemStyle-CssClass="hide" HeaderStyle-CssClass="hide">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="FORM_PaymentCategory" runat="server" Width="99%">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="款项用途" ShowHeader="false" ItemStyle-CssClass="hide" HeaderStyle-CssClass="hide">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="FORM_PaymentPurpose" runat="server" Width="99%">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <HeaderStyle Width="15%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="账面应付余额" HeaderStyle-Width="10%">
                                            <ItemStyle CssClass="text-left" />
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox6" Width="99%" CssClass="txt" Style="text-align: left;" runat="server" onchange='app1.YanZheng_Jin_E(this);'></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="质保金" HeaderStyle-Width="10%" ItemStyle-CssClass="hide" HeaderStyle-CssClass="hide">
                                            <ItemStyle />
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox7" Width="99%" CssClass="txt" Style="text-align: left;" runat="server" onchange='app1.YanZheng_Jin_E(this);'></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="申请金额" HeaderStyle-Width="10%">
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox8" Width="99%" CssClass="txt" Style="text-align: left;" runat="server" onchange='app1.YanZheng_Jin_E(this);'></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="审批资金" HeaderStyle-Width="10%">
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox10" Width="99%" CssClass="txt" Style="text-align: left;" runat="server" onchange='app1.YanZheng_Jin_E(this);'></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="总部资金审批金额" HeaderStyle-Width="10%" ItemStyle-CssClass="hide" HeaderStyle-CssClass="hide">
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox11" Width="99%" CssClass="txt" Style="text-align: left;" runat="server" onchange='app1.YanZheng_Jin_E(this);'></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="备注" HeaderStyle-Width="10%">
                                            <ItemTemplate>
                                                <asp:TextBox ID="TextBox9" Width="99%" CssClass="txt" Style="text-align: left;" runat="server"></asp:TextBox>
                                            </ItemTemplate>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                        </asp:TemplateField>
                                        <%--<asp:TemplateField HeaderText="已支付资金额" ItemStyle-HorizontalAlign="Center"
                                        ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Width="99%" CssClass="txt" Style="text-align: center;"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="100px"></HeaderStyle>
                                        </asp:TemplateField>--%>
                                        <asp:TemplateField HeaderText="流入(出)率" ItemStyle-HorizontalAlign="Center"
                                            ItemStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Width="99%" CssClass="txt" Style="text-align: center;"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="100px"></HeaderStyle>
                                        </asp:TemplateField>
                                    </Columns>
                                    <SelectedRowStyle />
                                    <HeaderStyle BackColor="#ECF7FF" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr id="mytr" runat="server">
                            <td>
                                <a href="#" style="color: Blue; font-size: 12px; padding-left: 20px;" onclick="$('#btnAdd').click();">新增一行</a>
                                <a href="#" style="color: Blue; font-size: 12px; padding-left: 5px;" onclick="$('#btnDel').click();">删除所选</a>
                                <%--<input type="text" value="" runat="server" id="p_id" style="width: 20px;" />
                            <span style="color:Red;">*填写需删除行数</span>--%>
                                <asp:Button ID="btnAdd" runat="server" Text="新增一行" CssClass="hide" OnClick="btnAdd_Click" />
                                <asp:Button ID="btnDel" runat="server" Text="删除所选" CssClass="hide" OnClick="btnDel_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="Content" style="top: auto; bottom: 0px; height: 35px; overflow: inherit; text-align: center;">
                    <%--<asp:Button ID="btnSum" runat="server" Text="求和" CssClass="bt_css_s" OnClick="btnSum_Click" />--%>
                    <asp:Button ID="btnOk" runat="server" Text="确定" CssClass="bt_css_s" OnClick="btnOk_Click" />
                    <asp:Button ID="btnDaochu" runat="server" Text="导出" CssClass="hide" OnClick="btnDaochu_Click" />
                </div>
            </div>
        </div>
    </form>
</body>
</html>